
def ReadFile(filename):
    f = open(filename)
    d = f.read()
    f.close()
    return d
    
import os

def WriteFile(filename, data):
    if not os.path.exists( os.path.dirname(filename) ):
        os.makedirs(os.path.dirname(filename) )
    f = open(filename,"w")
    f.write(data)
    f.close()
    
    
